#include <stdio.h>

int conunt_1(unsigned int n) {
    int count = 0;
	while(n) {
		count += 1;
		n &= n-1;	//消去最右边的1
	}
    return count;
}

void main()
{
	printf("%d\n",conunt_1(9));
}

